<?php session_start();
require '../common/Utility.php';
require '../db/configuration.php';
require '../crud/CustomSecurity.class.php';
require '../crud/Users.class.php';
loadDB();
isAdmin();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">

<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 
    <link rel="stylesheet" type="text/css" href="../css/page.css" />
        <link rel="stylesheet" type="text/css" href="../css/userAdmin.css" />
	<title>User Admin</title>
	<meta name="author" content="Димитър Гьормов">
</head>

<body>
<a class="lenta" href="index.php"> Начало </a>
<div id="main">

	<?php
	
	$crud = new Users(con());
	
	if(isset($_POST['Remove'])) {
		$crud->remove($_POST['id']);
	}
	$tHeaders[0] = "email";
	$tHeaders[1] = "User Password";
	$tHeaders[2] = "privilegies";
	$tHeaders[3] = "name";
	$tHeaders[4] = "Delete";
	list_table($crud, 'userAdmin.php', $tHeaders, 'Users');
	?>


</div>
</body>
</html>
